home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / usrintrf.h < prev    next >
C/C++ Source or Header  |  2000-05-13  |  2KB  |  50 lines

  1. /*********************************************************************
  2.  
  3.   usrintrf.h
  4.  
  5.   Functions used to handle MAME's crude user interface.
  6.  
  7. *********************************************************************/
  8.  
  9. #ifndef USRINTRF_H
  10. #define USRINTRF_H
  11.  
  12. struct DisplayText
  13. {
  14.     const char *text;    /* 0 marks the end of the array */
  15.     int color;    /* see #defines below */
  16.     int x;
  17.     int y;
  18. };
  19.  
  20. #define UI_COLOR_NORMAL 0    /* white on black text */
  21. #define UI_COLOR_INVERSE 1    /* black on white text */
  22.  
  23. #define SEL_BITS 12        /* main menu selection mask */
  24. #define SEL_BITS2 4        /* submenu selection masks */
  25. #define SEL_MASK ((1<<SEL_BITS)-1)
  26. #define SEL_MASK2 ((1<<SEL_BITS2)-1)
  27.  
  28. extern int need_to_clear_bitmap;    /* used to tell updatescreen() to clear the bitmap */
  29.  
  30. struct GfxElement *builduifont(void);
  31. void pick_uifont_colors(void);
  32. void displaytext(struct osd_bitmap *bitmap,const struct DisplayText *dt,int erase,int update_screen);
  33. void ui_text(struct osd_bitmap *bitmap,const char *buf,int x,int y);
  34. void ui_drawbox(struct osd_bitmap *bitmap,int leftx,int topy,int width,int height);
  35. void ui_displaymessagewindow(struct osd_bitmap *bitmap,const char *text);
  36. void ui_displaymenu(struct osd_bitmap *bitmap,const char **items,const char **subitems,char *flag,int selected,int arrowize_subitem);
  37. int showcopyright(struct osd_bitmap *bitmap);
  38. int showgamewarnings(struct osd_bitmap *bitmap);
  39. void set_ui_visarea (int xmin, int ymin, int xmax, int ymax);
  40.  
  41. void init_user_interface(void);
  42. int handle_user_interface(struct osd_bitmap *bitmap);
  43.  
  44. int onscrd_active(void);
  45. int setup_active(void);
  46.  
  47. void CLIB_DECL usrintf_showmessage(const char *text,...);
  48.  
  49. #endif
  50.